package com.example.multi.token.provider.service.impl;

import com.example.multi.token.provider.common.Global;
import com.example.multi.token.provider.model.TokenInfo;
import com.example.multi.token.provider.service.ITokenService;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * @author
 * @description
 * @create 2022-05-20 11:29
 */
@Service
public class TokenServiceImpl implements ITokenService {
    @Override
    public TokenInfo getToken() {
        TokenInfo ti = new TokenInfo();
        String token = UUID.randomUUID().toString();
        ti.setToken(token);
        ti.setExpiredTime(Global.MAX_EXPIRED_TIME);
        return ti;
    }
}
